=over

=item $PERL_VERSION

=item $^V
X<$^V> X<$PERL_VERSION>

=for comment
These are documented in the generated file lib/Config.pod.  This looks
like as good a place as any to give notice that they are documented.

The revision, version, and subversion of the Perl interpreter,
represented as a L<version> object.

This variable first appeared in perl v5.6.0; earlier versions of perl
will see an undefined value.  Before perl v5.10.0 C<$^V> was represented
as a v-string rather than a L<version> object.

C<$^V> can be used to determine whether the Perl interpreter executing
a script is in the right range of versions.  For example:

    warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1

While version objects overload stringification, to portably convert
C<$^V> into its string representation, use C<sprintf()>'s C<"%vd">
conversion, which works for both v-strings or version objects:

    printf "version is v%vd\n", $^V;  # Perl's version

See the documentation of C<use VERSION> and C<require VERSION>
for a convenient way to fail if the running Perl interpreter is too old.

See also C<L</$]>> for a decimal representation of the Perl version.

The main advantage of C<$^V> over C<$]> is that, for Perl v5.10.0 or
later, it overloads operators, allowing easy comparison against other
version representations (e.g. decimal, literal v-string, "v1.2.3", or
objects).  The disadvantage is that prior to v5.10.0, it was only a
literal v-string, which can't be easily printed or compared, whereas
the behavior of C<$]> is unchanged on all versions of Perl.

Mnemonic: use ^V for a version object.

=back